LEADTOOLS (Leadtools assembly)

RasterImage Constructor(RasterMemoryFlags,Int32,Int32,Int32,RasterByteOrder,RasterViewPerspective,RasterColor[])

Show in webframe







A combination of the RasterMemoryFlags enumeration members indicating the type of memory to allocate for the image data.
Width of the image in pixels.
Height of the image in pixels.

The number of bits per pixel.

Valid values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32, 48, and 64.

Use 0 to create an 8-bit grayscale image. In that case, the method ignores the order and the palette parameters.

Color order for 16-, 24-, 32-, 48- and 64-bit images.

If the resultant image is less than 16 bits per pixel, this will have no effect since palletized images have no order.

Specifies where the beginning of the image is stored.

Most file formats start in the lower left corner while some formats start in the upper left corner.

The palette that the image will use. You can specify your own palette, or use null (Nothing in Visual Basic) for LEAD's fixed palette. The palette member is used only when bitsPerPixel is less than or equal to 8.
Constructs a new RasterImage object using the specified parameters and optional managed memory.
Syntax
public RasterImage( 
   RasterMemoryFlags flags,
   int width,
   int height,
   int bitsPerPixel,
   RasterByteOrder order,
   RasterViewPerspective viewPerspective,
   RasterColor[] palette
)
'Declaration
 
Public Function New( _
   ByVal flags As RasterMemoryFlags, _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal bitsPerPixel As Integer, _
   ByVal order As RasterByteOrder, _
   ByVal viewPerspective As RasterViewPerspective, _
   ByVal palette() As RasterColor _
)
'Usage
 
Dim flags As RasterMemoryFlags
Dim width As Integer
Dim height As Integer
Dim bitsPerPixel As Integer
Dim order As RasterByteOrder
Dim viewPerspective As RasterViewPerspective
Dim palette() As RasterColor
 
Dim instance As New RasterImage(flags, width, height, bitsPerPixel, order, viewPerspective, palette)
public RasterImage( 
   RasterMemoryFlags flags,
   int width,
   int height,
   int bitsPerPixel,
   RasterByteOrder order,
   RasterViewPerspective viewPerspective,
   RasterColor[] palette
)
-(id)initWithFlags:(LTRasterMemoryFlags)flags
             width:(unsigned int)inWidth
            height:(unsigned int)inHeight
      bitsPerPixel:(unsigned int)inBitsPerPixel
             order:(LTRasterByteOrder)inOrder
   viewPerspective:(LTRasterViewPerspective)inViewPerspective
           palette:(NSArray*)palette
             error:(NSError**)outError;
            

            
function RasterImage( 
   flags ,
   width ,
   height ,
   bitsPerPixel ,
   order ,
   viewPerspective ,
   palette 
)

Parameters

flags
A combination of the RasterMemoryFlags enumeration members indicating the type of memory to allocate for the image data.
width
Width of the image in pixels.
height
Height of the image in pixels.
bitsPerPixel

The number of bits per pixel.

Valid values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32, 48, and 64.

Use 0 to create an 8-bit grayscale image. In that case, the method ignores the order and the palette parameters.

order

Color order for 16-, 24-, 32-, 48- and 64-bit images.

If the resultant image is less than 16 bits per pixel, this will have no effect since palletized images have no order.

viewPerspective

Specifies where the beginning of the image is stored.

Most file formats start in the lower left corner while some formats start in the upper left corner.

palette
The palette that the image will use. You can specify your own palette, or use null (Nothing in Visual Basic) for LEAD's fixed palette. The palette member is used only when bitsPerPixel is less than or equal to 8.
Remarks

Support for 12 and 16-bit grayscale images is only available in the Document/Medical Imaging editions.

There is some speed penalty (loss) for accessing RasterMemoryFlags.Tiled images. Therefore, it is not recommended for use with all images.

The RasterMemoryFlags.Tiled images are not used by default. LEADTOOLS will create them only if it failed to create RasterMemoryFlags.Conventional images and RasterMemoryFlags.NoTiled was not specified.

The following lists the distinct types of bitmaps:

For more information, refer to Accounting for View Perspective.

For more information, refer to Grayscale Images.

Example
For an example, refer to RasterImage.
Requirements

Target Platforms

See Also

Reference

RasterImage Class
RasterImage Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.